package kr.co.dayve.site.management.service;


import kr.co.dayve.site.domain.Category;
import kr.co.dayve.site.domain.Item;
import kr.co.dayve.site.management.dao.*;

import java.util.List;


public class MyPageServiceImpl implements MyPageService {

    // categoryDao
    public List getCategoryList(){
        return categoryDao.getCategoryList();
    }


    public List getCategoryListByMembersId(Category category){
        return categoryDao.getCategoryListByMembersId(category);
    }

    public String getTotalCategoryCountByMembersId(Category category){
        return categoryDao.getTotalCategoryCountByMembersId(category);
    }

    public Category getCategoryByCategoryId(String category_id){
        return categoryDao.getCategoryByCategoryId(category_id);
    }

    // itemDao
    public List getItemList(){
        return itemDao.getItemList();
    }

    public List getItemListByCategory(Category category){
        return itemDao.getItemListByCategory(category);
    }

    public String getTotalItemCountByCategory(Category category){
        return itemDao.getTotalItemCountByCategory(category);
    }

    public Item getItemByItemId(String item_id){
        return itemDao.getItemByItemId(item_id);
    }

    public String getTotalItemByMembersId(String members_id){
        return itemDao.getTotalItemByMembersId(members_id);
    }

    public List getItemEventByCategory(Category category){
        return itemEventDao.getItemEventByCategory(category);
    }


    ///////////////////////////////////////
	// Spring Framework Setter Injection //
	///////////////////////////////////////
    
    private CategoryDao categoryDao;
    private ItemDao itemDao;
    private ItemEventDao itemEventDao;

    public void setCategoryDao(CategoryDao categoryDao) {
        this.categoryDao = categoryDao;
    }

    public void setItemDao(ItemDao itemDao) {
        this.itemDao = itemDao;
    }

    public void setItemEventDao(ItemEventDao itemEventDao) {
        this.itemEventDao = itemEventDao;
    }
}
